<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>参数配置添加</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css" />
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/dtree.css" />
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/font/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/darkBlue.css"/>
</head>
<body>
<div class="page-content-wrap">
    <form class="layui-form">
        <div class="layui-tab" style="margin:0 50px 70px 30px;">
            <div class="layui-tab-content">
                <div class="layui-tab-item"></div>
                <div class="layui-tab-item layui-show">
                    <input type="hidden" class="form-control id" id="id" name="id" value="${paramConfig.id}" />
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="red">*</span>&nbsp;参&nbsp;数&nbsp;ID：</label>
                        <div class="layui-input-block">
                            <input type="text" name="paramid" required  lay-verify="required" placeholder="请输入参数ID" value="${paramConfig.paramid}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="red">*</span>参数名称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="info" required  lay-verify="required" placeholder="请输入参数名称" value="${paramConfig.info}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="red">*</span>&nbsp;状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：</label>
                        <div class="layui-input-block">
                            <select name="removetag" id="removetag">

                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
                        <div class="layui-input-block">
                            <input type="text" name="remark" placeholder="请输入备注" value="${paramConfig.remark}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-pop-btn">
            <div class="">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitBtn">提交</button>
                <button type="button" id="cancel" class="layui-btn layui-btn-primary">取消</button>
                <button type="button" style="display: none;" id="save" class="layui-btn layui-btn-primary"></button>
            </div>
        </div>
    </form>
</div>

<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['form', 'jquery', 'laydate', 'layer', 'dialog','baseutil','page','dtreeUtil'], function() {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery,
            baseutil = layui.baseutil,
            dialog = layui.dialog,
            dtreeUtil = layui.dtreeUtil;
        var page = layui.page;
        page.initDict("base_status",function (dictData) {
            page.showDict($("#removetag"), page.aceeptDictContentList(dictData, "base_status"), "",'${paramConfig.removetag}');
        });
        //监听提交
        form.on('submit(submitBtn)', function(data){
            baseutil.post("/paramConfig/addOrUpdate",data.field,function (result) {
                dialog.msg(result.data);
                $("#save").click();
            });
            return false;
        });
    });
</script>
</body>

</html>